package com.example.common;

import lombok.Getter;

/**
 * 返回状态码枚举类
 */
@Getter
public enum ResultCode {
    
    SUCCESS(200, "success"),
    ERROR(500, "error"),
    PARAM_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    METHOD_NOT_ALLOWED(405, "请求方法不允许");
    
    private final Integer code;
    private final String message;
    
    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
} 